package com.one_1.factory;

import com.one_1.service.IFactory;
import com.one_1.service.impl.AliPayServiceImpl;
import com.one_1.service.impl.WxChatServiceImpl;

/**
 * @author SunChangSheng
 * @apiNote 支付工厂
 * @since 2021/12/7 17:14
 */
public class PayFactory {
    public IFactory unified(Integer type) {
        if (type == 1) {
            return new AliPayServiceImpl();
        }
        if (type == 2) {
            return new WxChatServiceImpl();
        }
        return null;
    }
}
